import ACTION_TYPE from '../constant/action-types';

export function addDataType(api) {
  return {
    type: ACTION_TYPE.ADD_DATA_TYPE,
    payload: api,
  };
}

export function removeDataType(type) {
  return {
    type: ACTION_TYPE.REMOVE_DATA_TYPE,
    payload: type,
  };
}

export function updateDataType(id, data) {
  return {
    type: ACTION_TYPE.UPDATE_DATA_TYPE,
    payload: {
      id,
      data,
    },
  };
}
